// my-items.less

/* 颜色变量 */
@color-primary-text: #303133;
@color-regular-text: #606266;
@color-secondary-text: #909399;
@color-placeholder-text: #c0c4cc;

@color-theme: #19be6b;
@color-theme-dark: #18b566;
@color-danger: #f56c6c;
@color-warning: #f9ae3d;

/* 字体大小变量 */
@font-size-lg: 32rpx;
@font-size-df: 28rpx;
@font-size-md: 26rpx;
@font-size-sm: 24rpx;


.page-container {
  padding-bottom: 40rpx;
}

.t-tabs {
  --td-tabs-nav-bg-color: #fff;
}

.tab-panel-content {
  padding: 0 24rpx;
  box-sizing: border-box;
}

.list-empty-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 160rpx 0;
  color: @color-secondary-text;
  font-size: @font-size-df;
}

.item-card {
  background-color: #fff;
  border-radius: 16rpx;
  padding: 24rpx;
  margin-top: 24rpx;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  overflow: hidden;

  .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20rpx;
    font-size: @font-size-sm;
    color: @color-secondary-text;
    
    .category-tag {
      padding: 4rpx 12rpx;
      font-size: @font-size-sm;
      border: 1rpx solid @color-theme;
      color: @color-theme;
      background-color: fade(@color-theme, 10%);
      border-radius: 6rpx;
    }
  }

  .card-body {
    .content {
      color: @color-primary-text;
      font-size: @font-size-df;
      line-height: 1.6;
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-bottom: 20rpx;
      word-break: break-all;
    }

    .image-gallery {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 16rpx;

      .gallery-item {
        width: 100%;
        height: 200rpx;
        border-radius: 8rpx;
        background-color: #f2f3f5;
        &:active {
          opacity: 0.8;
        }
      }
    }
  }

  .violation-info {
    margin-top: 20rpx;
    padding: 16rpx;
    background-color: fade(@color-danger, 8%);
    border-radius: 8rpx;
    font-size: @font-size-md;
    color: @color-danger;
    .violation-label {
      font-weight: bold;
    }
  }

  .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24rpx;

    .edit-btn {
      font-size: @font-size-md;
      color: @color-regular-text;
      transition: background-color 0.2s;
      &:active {
        background-color: #f2f3f5;
      }
    }

    .price {
      color: @color-danger;
      font-weight: bold;
      display: flex;
      align-items: baseline;

      .price-symbol {
        font-size: @font-size-md;
        margin-right: 4rpx;
      }
      .price-value {
        font-size: @font-size-lg;
      }
    }
  }
}

/* 编辑弹窗 */
.edit-popup-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 32rpx;

  .popup-title {
    font-size: @font-size-lg;
    color: @color-primary-text;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40rpx;
  }
  
  .form-body {
    flex: 1;
    overflow-y: auto;
  }

  /* Switch 容器样式 */
  .switch-cell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20rpx 32rpx; // 模拟 van-cell 的内边距
    font-size: 28rpx; // van-cell 默认字体大小
    color: @color-regular-text; // van-cell 默认文字颜色
    
    .switch-cell__label {
      color: @color-regular-text; // 显式设置label颜色
    }
  }
}
